package com.liang.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liang.entity.CComment;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author 李昂
 * @since 2020-11-30
 */
public interface CCommentMapper extends BaseMapper<CComment> {

    //查看评论  一级
    List<CComment> getBlogComment(@Param("bid") Integer bid);

    @Delete("delete from c_comment where cid in (#{cid},(select cid2 from c_comment_id where cid1=#{cid}))")
    boolean deleteCommentid(@Param("cid") String cid);

}
